global class ApexBirthdayScheduler Implements Schedulable
            {
            Employee__c em;
            Decimal Bday = em.B_Day__c;
            Decimal Bmon = em.B_Month__c;
            Decimal mon = em.Month__c;
            Decimal day = em.Day__c;
            List<Employee__c> email = [Select E_mail__c from Employee__c  where B_Day__c=:day AND B_Month__c=:mon];
            private final List<Id> empids;
    global void execute(SchedulableContext sc)
       {
       List<Employee__c> emp = [Select ID from Employee__c  where B_Day__c=:day AND B_Month__c=:mon];
        for(Integer i=0;i<1000;i++){
         empids.add(emp[i].Id);
         if(emp.Size()>0){
        sendmail();
       }
      }
      }
         public void sendmail()
         {
             Messaging.MassEmailMessage mail = new Messaging.MassEmailMessage();
             mail.setTargetObjectIds(empids);
             mail.setTemplateId('00X90000000f4Fd');
             Messaging.sendEmail(new Messaging.MassEmailMessage[] { mail });
          }
        }